doctype html
html(lang="en")
  head
    meta(charset="utf-8")
    meta(name="viewport",content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0")
    title= pageTitle    

    link(rel="stylesheet",type="text/css",href="/statics/css/bootstrap.min.css" )
    link(rel="stylesheet",type="text/css",href="/statics/css/font-awesome.min.css" )

  body
    nav.navbar.navbar-fixed-top
      .container
        ul.nav.navbar-nav
          li
            a(href='/') 首页

    .container
      .page-header.text-center 
        h1.lead='欢迎回来， '+user
          .small
            a(href="/logout") 登出
        - if (errormessage)
          p=errormessage

      p.text-right
        span='共有'+projects.length+'个项目，'
        a.btn.btn-primary(href="/edit") 创建新项目
        a.btn.btn-primary(href="/view",style='margin-left:15px') 查看公共项目

      if(projects && projects.length)
        table.table.table-striped.projects
          thead
            tr
              th ID
              th 标题
              th.text-right 操作
              th 下载
          tbody
            each project in projects
              tr
                td=project._id
                td
                  a(href="/edit/"+project._id)=project.title
                td.text-right
                  a.btn.glyphicon.glyphicon-edit(href="/edit/"+project._id) 编辑
                  a.btn.glyphicon.glyphicon-duplicate(href="/edit?template="+project._id) 复制
                  a.btn.glyphicon.glyphicon-eye-open(href="/project/"+project._id,target="_blank") 查看
                  a.btn.glyphicon.glyphicon-trash(href="/delete/"+project._id) 删除
                td
                  a.btn.icon-download(href='/download/'+project._id)
      hr
      p.text-right
        span 注意：目前所有项目都是公共的

                